From: Carlos Garnacho Date: Mon, 17 Oct 2022 11:30:40 +0000 (+0200) Subject: inputMethod: Cache cursor rectangle X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~435^2^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ff09c4efc14be9c25ade570799cc917508a39bca;p=gnome-shell.git inputMethod: Cache cursor rectangle This may need to be synchronized in other places, so keep the rectangle around. Part-of: --- diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 3ee96a7fa..d9335cc81 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -217,8 +217,13 @@ var InputMethod = GObject.registerClass({ vfunc_set_cursor_location(rect) { if (this._context) { - this._context.set_cursor_location(rect.get_x(), rect.get_y(), - rect.get_width(), rect.get_height()); + this._cursorRect = { + x: rect.get_x(), y: rect.get_y(), + width: rect.get_width(), height: rect.get_height(), + }; + this._context.set_cursor_location( + this._cursorRect.x, this._cursorRect.y, + this._cursorRect.width, this._cursorRect.height); this._emitRequestSurrounding(); } }